package com.example.productviewserviceribbon.service;

import com.example.productviewserviceribbon.dao.entity.Product;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductService {
    Logger logger= LoggerFactory.getLogger(ProductService.class);
    @Autowired
    private ProductClientRibbon client;
    public List<Product> listProducts(){
        List<Product> products=client.listProducts();
        System.out.println("products.size={}"+products.size());
        logger.info("products.size={}"+products.size());

        return client.listProducts();
    }
}
